<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>滴滴法律</title>
	<link rel="stylesheet" type="text/css" href="css/normalize.css">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<!--[if lt IE 9]> 
		<script> src="js/html5shiv.min.js"></script> 
	<![endif]-->
</head>
<body>
	<div class="well well-sm">热门话题 / 话题详情</div>
	<form>
		<section style="margin-top:20px;">
			<div class="container-fuild">
				<div class="row">
					<div class="col-md-12">
						<div class="col-md-12 col-sm-12 col-xs-12 clear-padding" style="background:#fff;padding:10px 0;">
							<div class="tab-topic-con-info">
								<h4><span class="label label-info">15</span>本周热门话题:<a href="javascript:;">${lawThemes.themename}</a></h4>	
							</div>
							

						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-md-12">
						<!-- <div class="col-md-12 col-sm-12 col-xs-12 clear-padding" style="background:#fff;padding:10px 20px 0 20px;"> -->
							<c:forEach var="comments" items="${comments}">
							<div class="comment-info">
								
								<a href="#">${comments.username}:</a>
								<input type="button"  onclick="del((${comments.commentid}))" class="btn btn-danger btn-xs pull-right" value="删除">
								<p>${comments.commentcon}</p>
								<div class="icon-box text-left">
									<span class="glyphicon glyphicon-time"><fmt:formatDate value="${comments.commentTime}" pattern="yyyy-MM-dd hh:mm:ss"/></span><span class="glyphicon glyphicon-comment">35条评论</span><span class="glyphicon glyphicon-heart-empty">666</span>
								</div>

							</div>
							</c:forEach>
						<!-- </div> -->					
					</div>
				</div>


			</div>
		</section>
	</form>
	
</body>
<script type="text/javascript">
function del(commentsId){
	$.ajax({
       	 type: 'get',
   	     url: "topic/remove/" + commentsId,
   	     dataType:'json',    
   	     success: function (data){
   	     	alert(data.msg);
   	     	if (data.code == 200) {
   	     		location.reload();
   	     	}
   	     }
	  });
}
  
  </script>
</html>